﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using DIS_DAO.DTO;

namespace DIS_WS_BusinessLayer
{
    /// <summary>
    /// Service contains methods for business operation
    /// </summary>
    [ServiceContract]
    public interface IDIS_Service_BusinessLayer
    {
        #region CATEGORY

        /// <summary>
        /// Select all of categories exist in database
        /// </summary>
        /// <returns>List of categories</returns>
        [OperationContract]
        List<CategoryDTO> Category_SelectAll();

        /// <summary>
        /// Select a category by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected category</returns>
        [OperationContract]
        CategoryDTO Category_SelectByID(int id);

        /// <summary>
        /// Insert a new category to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert category to database</returns>
        [OperationContract]
        bool Category_Insert(CategoryDTO obj);

        /// <summary>
        /// Delete a category out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete category out of database</returns>
        [OperationContract]
        bool Category_Delete(int id);

        /// <summary>
        /// Update information for a category
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update category</returns>
        [OperationContract]
        bool Category_Update(CategoryDTO obj);

        #endregion

        #region DAILY REPORT

        /// <summary>
        /// Select all of dailyreport exist in database
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<DailyReportDTO> DailyReport_SelectAll();

        /// <summary>
        /// Select a dailyreport by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected dailyreport</returns>
        [OperationContract]
        DailyReportDTO DailyReport_SelectByID(int id);

        /// <summary>
        /// Insert a new dailyreport to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert dailyreport to database</returns>
        [OperationContract]
        bool DailyReport_Insert(DailyReportDTO obj);

        /// <summary>
        /// Delete a dailyreport out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete dailyreport out of database</returns>
        [OperationContract]
        bool DailyReport_Delete(int id);

        /// <summary>
        /// Update information for a dailyreport
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update dailyreport</returns>
        [OperationContract]
        bool DailyReport_Update(DailyReportDTO obj);

        /// <summary>
        /// Retrieve a dailyreport created by specified ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of dailyreport</returns>
        [OperationContract]
        List<DailyReportDTO> DailyReport_SelectByIDChemistWareHouse(int idChemistWareHouse);

        /// <summary>
        /// Select a dailyreport created by specified ChemistWareHouse and reportdate
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected dailyreport</returns>
        [OperationContract]
        DailyReportDTO DailyReport_SelectByIDChemistWareHouseAndReportDate(int idChemistWareHouse, DateTime reportdate);

        #endregion

        #region WEEKLY REPORT

        /// <summary>
        /// Select all of weeklyreport exist in database
        /// </summary>
        /// <returns>List of weeklyreport</returns>
        [OperationContract]
        List<WeeklyReportDTO> WeeklyReport_SelectAll();

        /// <summary>
        /// Select a weeklyreport by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected weeklyreport</returns>
        [OperationContract]
        WeeklyReportDTO WeeklyReport_SelectByID(int id);

        /// <summary>
        /// Insert a new weeklyreport to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert weeklyreport to database</returns>
        [OperationContract]
        bool WeeklyReport_Insert(WeeklyReportDTO obj);

        /// <summary>
        /// Delete a weeklyreport out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete weeklyreport out of database</returns>
        [OperationContract]
        bool WeeklyReport_Delete(int id);

        /// <summary>
        /// Update information for a weeklyreport
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update weeklyreport</returns>
        [OperationContract]
        bool WeeklyReport_Update(WeeklyReportDTO obj);

        /// <summary>
        /// Retrieve a list of weeklyreport created by specified ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of weeklyreport</returns>
        [OperationContract]
        List<WeeklyReportDTO> WeeklyReport_SelectByIDChemistWareHouse(int idChemistWareHouse);

        /// <summary>
        /// Retrieve a list of weeklyreport created by specified ChemistWareHouse in the peeriod of time
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of weeklyreport</returns>
        [OperationContract]
        WeeklyReportDTO WeeklyReport_SelectByIDChemistWareHouseAndReportDate(int idChemistWareHouse, DateTime startdate, DateTime enddate);

        #endregion

        #region ITEM

        /// <summary>
        /// Select all of item exist in database
        /// </summary>
        /// <returns>List of item</returns>
        [OperationContract]
        List<ItemDTO> Item_SelectAll();

        /// <summary>
        /// Select a item by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected item</returns>
        [OperationContract]
        ItemDTO Item_SelectByID(int id);

        /// <summary>
        /// Insert a new item to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert item to database</returns>
        [OperationContract]
        bool Item_Insert(ItemDTO obj);

        /// <summary>
        /// Delete a item out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete item out of database</returns>
        [OperationContract]
        bool Item_Delete(int id);

        /// <summary>
        /// Update information for a item
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update item</returns>
        [OperationContract]
        bool Item_Update(ItemDTO obj);

        /// <summary>
        /// Retrieve a list of items belong to specified category
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of item</returns>
        [OperationContract]
        List<ItemDTO> Item_SelectByIDCategory(int idcategory);

        /// <summary>
        /// Upload image for item to service
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="buffer"></param>
        /// <param name="oldname"></param>
        [OperationContract]
        bool Item_UploadFile(string filename, byte[] buffer, string oldname = "");

        /// <summary>
        /// Download image of item from service
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        [OperationContract]
        byte[] Item_DownloadFile(string fileName);

        #endregion

        #region EMPLOYEE

        /// <summary>
        /// Select all of employes exist in database
        /// </summary>
        /// <returns>List of employes</returns>
        [OperationContract]
        List<EmployeeDTO> Employee_SelectAll();

        /// <summary>
        /// Select a employe by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected employe</returns>
        [OperationContract]
        EmployeeDTO Employee_SelectByID(int id);

        /// <summary>
        /// Insert a new employe to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert employe to database</returns>
        [OperationContract]
        bool Employee_Insert(EmployeeDTO obj);

        /// <summary>
        /// Delete a employe out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete employe out of database</returns>
        [OperationContract]
        bool Employee_Delete(int id);

        /// <summary>
        /// Update information for a employe
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update employe</returns>
        [OperationContract]
        bool Employee_Update(EmployeeDTO obj);

        /// <summary>
        /// Retrieve a list of employees by specified role
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of employe</returns>
        [OperationContract]
        List<EmployeeDTO> Employee_SelectByIDRole(int idrole);

        /// <summary>
        /// Retrieve a list of employees by specified ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of employee</returns>
        [OperationContract]
        List<EmployeeDTO> Employee_SelectByIDChemistWareHouse(int idChemistWareHouse);

        /// <summary>
        /// Retrieve a employee by username
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected employee</returns>
        [OperationContract]
        EmployeeDTO Employee_SelectByUserName(string username);

        /// <summary>
        /// Retrieve a employee by username and password
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of employee</returns>
        [OperationContract]
        EmployeeDTO Employee_SelectByUserNameAndPassword(string username, string password);

        #endregion

        #region NATIONALPROMOTION

        /// <summary>
        /// Select all of national promotion exist in database
        /// </summary>
        /// <returns>List of national promotion</returns>
        [OperationContract]
        List<NationalPromotionDTO> NationalPromotion_SelectAll();

        /// <summary>
        /// Select a national promotion by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected national promotion</returns>
        [OperationContract]
        NationalPromotionDTO NationalPromotion_SelectByID(int id);

        /// <summary>
        /// Insert a new national promotion to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert national promotion to database</returns>
        [OperationContract]
        bool NationalPromotion_Insert(NationalPromotionDTO obj);

        /// <summary>
        /// Delete a national promotion out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete national promotion out of database</returns>
        [OperationContract]
        bool NationalPromotion_Delete(int id);

        /// <summary>
        /// Update information for a national promotion
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update national promotion</returns>
        [OperationContract]
        bool NationalPromotion_Update(NationalPromotionDTO obj);

        /// <summary>
        /// Retrieve a national promotion of specified item
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected promotion</returns>
        [OperationContract]
        NationalPromotionDTO NationalPromotion_SelectByIDItem(int iditem);

        #endregion

        #region LOCALPROMOTION

        /// <summary>
        /// Select all of local promotion exist in database
        /// </summary>
        /// <returns>List of local promotion</returns>
        [OperationContract]
        List<LocalPromotionDTO> LocalPromotion_SelectAll();

        /// <summary>
        /// Select a local promotion by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected local promotion</returns>
        [OperationContract]
        LocalPromotionDTO LocalPromotion_SelectByID(int id);

        /// <summary>
        /// Insert a new local promotion to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert local promotion to database</returns>
        [OperationContract]
        bool LocalPromotion_Insert(LocalPromotionDTO obj);

        /// <summary>
        /// Delete a local promotion out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete local promotion out of database</returns>
        [OperationContract]
        bool LocalPromotion_Delete(int id);

        /// <summary>
        /// Delete a local promotion of item belong to ChemistWareHouse out of database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: delete successful, false: cannot delete local promotion out of database</returns>
        [OperationContract]
        bool LocalPromotion_DeleteByIDItemAndIDChemistWareHouse(int iditem, int idChemistWareHouse);

        /// <summary>
        /// Update information for a local promotion
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update local promotion</returns>
        [OperationContract]
        bool LocalPromotion_Update(LocalPromotionDTO obj);

        /// <summary>
        /// Retrieve list of local promotion by item
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of local promotion</returns>
        [OperationContract]
        List<LocalPromotionDTO> LocalPromotion_SelectByIDItem(int iditem);

        /// <summary>
        /// Retrieve a list of local promotion for all item in ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of local promotion</returns>
        [OperationContract]
        List<LocalPromotionDTO> LocalPromotion_SelectByIDChemistWareHouse(int idChemistWareHouse);

        /// <summary>
        /// Retrieve a local promotion of item in ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected local promotion</returns>
        [OperationContract]
        LocalPromotionDTO LocalPromotion_SelectByIDItemAndIDChemistWareHouse(int iditem, int idChemistWareHouse);

        #endregion

        #region ORDERS

        /// <summary>
        /// Select all of order exist in database
        /// </summary>
        /// <returns>List of order</returns>
        [OperationContract]
        List<OrdersDTO> Orders_SelectAll();

        /// <summary>
        /// Select a order by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected order</returns>
        [OperationContract]
        OrdersDTO Orders_SelectByID(int id);

        /// <summary>
        /// Insert a new order to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert order to database</returns>
        [OperationContract]
        bool Orders_Insert(ref OrdersDTO obj);

        /// <summary>
        /// Delete a order out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete order out of database</returns>
        [OperationContract]
        bool Orders_Delete(int id);

        /// <summary>
        /// Update information for a order
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update order</returns>
        [OperationContract]
        bool Orders_Update(OrdersDTO obj);

        /// <summary>
        /// Retrieve a list of order of ChemistWareHouse
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of order</returns>
        [OperationContract]
        List<OrdersDTO> Orders_SelectByIDChemistWareHouse(int idChemistWareHouse);

        /// <summary>
        /// Retrieve a list of order of ChemistWareHouse in the specifided datetime
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of order</returns>
        [OperationContract]
        List<OrdersDTO> Orders_SelectByIDChemistWareHouseAndOrderDate(int idChemistWareHouse, DateTime orderdate);

        /// <summary>
        /// Retrieve a list of order of specified customer
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of order</returns>
        [OperationContract]
        List<OrdersDTO> Orders_SelectByIDCustomer(int idcustomer);

        #endregion

        #region ORDERDETAIL

        /// <summary>
        /// Select all of order detail exist in database
        /// </summary>
        /// <returns>List of order detail</returns>
        [OperationContract]
        List<OrderDetailDTO> OrderDetail_SelectAll();

        /// <summary>
        /// Select a order detail by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected order detail</returns>
        [OperationContract]
        OrderDetailDTO OrderDetail_SelectByID(int id);

        /// <summary>
        /// Insert a new order detail to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert order detail to database</returns>
        [OperationContract]
        bool OrderDetail_Insert(OrderDetailDTO obj);

        /// <summary>
        /// Delete a order detail out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete order detail out of database</returns>
        [OperationContract]
        bool OrderDetail_Delete(int id);

        /// <summary>
        /// Delete a order detail belong to specified order out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete order detail out of database</returns>
        [OperationContract]
        bool OrderDetail_DeleteByOrder(int idorder);

        /// <summary>
        /// Update information for a order detail
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update order detail</returns>
        [OperationContract]
        bool OrderDetail_Update(OrderDetailDTO obj);

        /// <summary>
        /// Retrieve a list of order detail from specified order
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of order detail</returns>
        [OperationContract]
        List<OrderDetailDTO> OrderDetail_SelectByIDOrder(int idorder);

        /// <summary>
        /// Retrieve a list of order detail from specified item
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of order detail</returns>
        [OperationContract]
        List<OrderDetailDTO> OrderDetail_SelectByIDItem(int iditem);

        #endregion

        #region ROLEFUNCTIONS

        /// <summary>
        /// Select all of role functions exist in database
        /// </summary>
        /// <returns>List of role functions</returns>
        [OperationContract]
        List<RoleFunctionsDTO> RoleFunctions_SelectAll();

        /// <summary>
        /// Select a role functions by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected role functions</returns>
        [OperationContract]
        RoleFunctionsDTO RoleFunctions_SelectByID(int id);

        /// <summary>
        /// Insert a new role functions to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert role functions to database</returns>
        [OperationContract]
        bool RoleFunctions_Insert(RoleFunctionsDTO obj);

        /// <summary>
        /// Delete a role functions out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete role functions out of database</returns>
        [OperationContract]
        bool RoleFunctions_Delete(int id);

        /// <summary>
        /// Update information for a role functions
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update role functions</returns>
        [OperationContract]
        bool RoleFunctions_Update(RoleFunctionsDTO obj);

        /// <summary>
        /// Retrieve a list of role functions from role
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of role functions</returns>
        [OperationContract]
        List<RoleFunctionsDTO> RoleFunctions_SelectByIDRole(int idrole);

        /// <summary>
        /// Retrieve a list of role functions from function
        /// </summary>
        /// <param name="id"></param>
        /// <returns>List of role functions</returns>
        [OperationContract]
        List<RoleFunctionsDTO> RoleFunctions_SelectByIDFunction(int idfunction);

        #endregion

        #region FUNCTIONS

        /// <summary>
        /// Select all of functions exist in database
        /// </summary>
        /// <returns>List of function</returns>
        [OperationContract]
        List<FunctionsDTO> Functions_SelectAll();

        /// <summary>
        /// Select a function by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected function</returns>
        [OperationContract]
        FunctionsDTO Functions_SelectByID(int id);

        /// <summary>
        /// Insert a new function to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert function to database</returns>
        [OperationContract]
        bool Functions_Insert(FunctionsDTO obj);

        /// <summary>
        /// Delete a function out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete function out of database</returns>
        [OperationContract]
        bool Functions_Delete(int id);

        /// <summary>
        /// Update information for a function
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update function</returns>
        [OperationContract]
        bool Functions_Update(FunctionsDTO obj);

        #endregion

        #region ROLE

        /// <summary>
        /// Select all of role exist in database
        /// </summary>
        /// <returns>List of role</returns>
        [OperationContract]
        List<RoleDTO> Role_SelectAll();

        /// <summary>
        /// Select a role by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected role</returns>
        [OperationContract]
        RoleDTO Role_SelectByID(int id);

        /// <summary>
        /// Insert a new role to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert role to database</returns>
        [OperationContract]
        bool Role_Insert(RoleDTO obj);

        /// <summary>
        /// Delete a role out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete role out of database</returns>
        [OperationContract]
        bool Role_Delete(int id);

        /// <summary>
        /// Update information for a role
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update role</returns>
        [OperationContract]
        bool Role_Update(RoleDTO obj);

        #endregion

        #region CHEMIST WAREHOUSE

        /// <summary>
        /// Select all of ChemistWareHouse exist in database
        /// </summary>
        /// <returns>List of ChemistWareHouse</returns>
        [OperationContract]
        List<ChemistWareHouseDTO> ChemistWareHouse_SelectAll();

        /// <summary>
        /// Select a ChemistWareHouse by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected ChemistWareHouse</returns>
        [OperationContract]
        ChemistWareHouseDTO ChemistWareHouse_SelectByID(int id);

        /// <summary>
        /// Insert a new ChemistWareHouse to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert ChemistWareHouse to database</returns>
        [OperationContract]
        bool ChemistWareHouse_Insert(ChemistWareHouseDTO obj);

        /// <summary>
        /// Delete a ChemistWareHouse out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete ChemistWareHouse out of database</returns>
        [OperationContract]
        bool ChemistWareHouse_Delete(int id);

        /// <summary>
        /// Update information for a ChemistWareHouse
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update ChemistWareHouse</returns>
        [OperationContract]
        bool ChemistWareHouse_Update(ChemistWareHouseDTO obj);

        #endregion

        #region CUSTOMER

        /// <summary>
        /// Select all of customer exist in database
        /// </summary>
        /// <returns>List of customer</returns>
        [OperationContract]
        List<CustomerDTO> Customer_SelectAll();

        /// <summary>
        /// Select a customer by id 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected customer</returns>
        [OperationContract]
        CustomerDTO Customer_SelectByID(int id);

        /// <summary>
        /// Insert a new customer to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert customer to database</returns>
        [OperationContract]
        bool Customer_Insert(CustomerDTO obj);

        /// <summary>
        /// Delete a customer out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete customer out of database</returns>
        [OperationContract]
        bool Customer_Delete(int id);

        /// <summary>
        /// Update information for a customer
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update customer</returns>
        [OperationContract]
        bool Customer_Update(CustomerDTO obj);

        /// <summary>
        /// Select a customer by username
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected customer</returns>
        [OperationContract]
        CustomerDTO Customer_SelectByUserName(string username);

        /// <summary>
        /// Select a customer by username and password
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected customer</returns>
        [OperationContract]
        CustomerDTO Customer_SelectByUserNameAndPassword(string username, string password);

        #endregion

        #region CART

        [OperationContract]
        /// <summary>
        /// Select all of cart by id
        /// </summary>
        /// <returns>List of cart</returns>
        List<CartDTO> Cart_SelectByCartID(string cartid);

        [OperationContract]
        /// <summary>
        /// Select a cart by id and item
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected cart</returns>
        CartDTO Cart_SelectByIDAndItem(string cartid, int itemid);

        [OperationContract]
        /// <summary>
        /// Select a cart by id and record id
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected cart</returns>
        CartDTO Cart_SelectByIDAndRecordID(string cartid, int recordid);

        [OperationContract]
        /// <summary>
        /// Select a cart by recordid 
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Selected cart</returns>
        CartDTO Cart_SelectByRecordID(int recordid);

        [OperationContract]
        /// <summary>
        /// Insert a new cart to database
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: insert successful, false: cannot insert cart to database</returns>
        bool Cart_Insert(CartDTO obj);

        [OperationContract]
        /// <summary>
        /// Delete a cart out of database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>true: delete successful, false: cannot delete cart out of database</returns>
        bool Cart_Delete(string cartid, int recordid);

        [OperationContract]
        /// <summary>
        /// Make cart empty
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: make successfully, false: cannot make</returns>
        bool Cart_Empty(string cartid);

        [OperationContract]
        /// <summary>
        /// Update information for a cart
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>true: update successful, false: cannot update cart</returns>
        bool Cart_Update(CartDTO obj);

        #endregion
    }
}
